/**
 * FileName: WebImageConfig
 * Author: Mr.Wang
 * Date: 2025/10/8 08:47
 * Description:
 * History:
 */
package org.test.device.config.web;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * 〈一句话功能简述〉<br>
 * 〈浏览器获取图片〉
 *
 * @author Mr.Wang
 * @create 2025/10/8
 * @since 1.0.0
 */
@Configuration
public class WebImageConfig implements WebMvcConfigurer {

    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        // 配置图片资源路径，这里假设图片存放在 /var/images 目录下
        registry.addResourceHandler("/images/**")
                .addResourceLocations("file:/var/images/");
    }
}